# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=libicu52
_pkgname=icu
pkgver=52.1
pkgrel=2
pkgdesc='International Components for Unicode library.'
arch=('x86_64' 'aarch64')
url='http://www.icu-project.org/'
license=('custom:ICU')
depends=('gcc-libs')
source=("http://download.icu-project.org/files/icu4c/$pkgver/icu4c-${pkgver//./_}-src.tgz")
sha512sums=('5300b1d97340850d3d72af220ff5cbc2ae2820aff4367b60e52f17ead9831011dcda3d4c5af57c899d47b6fc964b23c9c8922954b32d314d669eb1a479a2efb0')

build() {
  cd "$_pkgname/source"

  ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
    --libdir=/usr/lib

  make
}

package() {
  cd "$_pkgname/source"

  install -dm 755 "$pkgdir/usr/lib"

  cp -a lib/libicu*52* "$pkgdir/usr/lib"

  install -Dm 644 "$srcdir/$_pkgname/license.html" \
    "$pkgdir/usr/share/licenses/$pkgname/license.html"
}

